var fs = require('fs');
exports.getLogger = function(writeStream){
	var logger = new Logger(writeStream);
	return logger;
}

exports.getFileLogger = function(path){
	var writeStream = fs.createWriteStream(path);
	writeStream.on('error', function(e){
		console.log(e)
	})
	var logger = new Logger(writeStream);
	return logger;
}

function Logger(writeStream){
	var SELF = this;
	this.writeStream = writeStream;
	this.log = function(chunk){
		SELF.writeStream.write(chunk)
	}
	
}